using UnityEngine;
// [Assembly-CSharp.dll].AdsManagerCustom
public class AdsManagerCustom : MonoBehaviour
{
    
    #region AdsManagerCustom.<FirstTimeAd>d__32
    // [Assembly-CSharp.dll].AdsManagerCustom.<FirstTimeAd>d__32
    private sealed class _FirstTimeAd_d__32 : IEnumerator<object>, IEnumerator, IDisposable
    {
        // Fields
        private int __1__state;
        private object __2__current;
        public AdsManagerCustom __4__this;
        
        // Properties
        private object System.Collections.Generic.IEnumerator<System.Object>.Current { get; }
        private object System.Collections.IEnumerator.Current { get; }
        
        // Methods
        public _FirstTimeAd_d__32(int __1__state)
        {
            this.__1__state = __1__state;
        }
        private void System.IDisposable.Dispose()
        {
        
        }
        private bool MoveNext()
        {
            AdsManagerCustom val_5;
            if((this.__1__state - 1) < 2)
            {
                    val_5 = this.__4__this;
                this.__1__state = 0;
                if((this.__4__this.FirstTimeADShow == true) || (this.__4__this.counter >= 60))
            {
                    return false;
            }
            
                if(this.__4__this.InterstitialTemp != null)
            {
                    if(this.__4__this.InterstitialTemp.CanShowAd() != false)
            {
                    val_5.ShowAdmobInterstitial_Temp();
                this.__4__this.FirstTimeADShow = true;
            }
            
            }
            
                int val_5 = this.__4__this.counter;
                val_5 = val_5 + 1;
                this.__4__this.counter = val_5;
                UnityEngine.WaitForSeconds val_3 = 536895821;
                val_5 = val_3;
                val_3 = new UnityEngine.WaitForSeconds(seconds:  1f);
                this.__2__current = val_5;
                this.__1__state = 2;
                return false;
            }
            
            if(this.__1__state != 0)
            {
                    return false;
            }
            
            this.__1__state = 0;
            UnityEngine.WaitForSeconds val_4 = 536895821;
            val_5 = val_4;
            val_4 = new UnityEngine.WaitForSeconds(seconds:  2f);
            this.__2__current = val_5;
            this.__1__state = 1;
            return false;
        }
        private object System.Collections.Generic.IEnumerator<System.Object>.get_Current()
        {
            return (object)this.__2__current;
        }
        private void System.Collections.IEnumerator.Reset()
        {
            27351792 = new System.NotSupportedException();
            throw 27351792;
        }
        private object System.Collections.IEnumerator.get_Current()
        {
            return (object)this.__2__current;
        }
    
    }
    
    #endregion
    
    
    #region AdsManagerCustom.<>c__DisplayClass56_0
    // [Assembly-CSharp.dll].AdsManagerCustom.<>c__DisplayClass56_0
    private sealed class __c__DisplayClass56_0
    {
        // Fields
        public System.Action _successCallBack;
        public AdsManagerCustom __4__this;
        
        // Methods
        public __c__DisplayClass56_0()
        {
        
        }
        internal void <showAdmobRewardedVideo>b__0(GoogleMobileAds.Api.Reward reward)
        {
            this.__4__this.successCallBack = 0;
            throw new NullReferenceException();
        }
    
    }
    
    #endregion
    
    
    #region AdsManagerCustom.<>c
    // [Assembly-CSharp.dll].AdsManagerCustom.<>c
    [Serializable]
    private sealed class __c
    {
        // Fields
        public static readonly AdsManagerCustom.<>c __9;
        public static System.Action __9__61_1;
        public static System.Action __9__61_2;
        public static System.Action<GoogleMobileAds.Api.AdError> __9__61_5;
        public static System.Action __9__73_0;
        
        // Methods
        private static __c()
        {
            object val_1 = 536897461;
            val_1 = new System.Object();
            mem2[0] = val_1;
            throw new NullReferenceException();
        }
        public __c()
        {
        
        }
        internal void <RegisterEventHandlers>b__61_1()
        {
            UnityEngine.Debug.Log(message:  -1610609755);
        }
        internal void <RegisterEventHandlers>b__61_2()
        {
            UnityEngine.Debug.Log(message:  -1610609753);
        }
        internal void <RegisterEventHandlers>b__61_5(GoogleMobileAds.Api.AdError error)
        {
            string val_2;
            if(error != null)
            {
                    val_2 = error;
            }
            else
            {
                    val_2 = 0;
            }
            
            UnityEngine.Debug.LogError(message:  -1610609765(-1610609765) + val_2);
        }
        internal void <PrintStatus>b__73_0()
        {
        
        }
    
    }
    
    #endregion
    
    // Fields
    public string appId;
    public string bannerId;
    public string topLeftBannerID;
    public string topRightBannerID;
    public string RectangleBannerId;
    public string interId;
    public string InterTemp_id;
    public string rewardedId;
    public string appOpenId;
    public GoogleMobileAds.Api.AdPosition adPosition;
    public bool isTestMode;
    public bool isChildDirected;
    private GoogleMobileAds.Api.BannerView bannerView;
    private GoogleMobileAds.Api.BannerView Rect_Banner;
    private GoogleMobileAds.Api.BannerView topLeftBannerView;
    private GoogleMobileAds.Api.BannerView topRightBannerView;
    private GoogleMobileAds.Api.InterstitialAd interstitial;
    private GoogleMobileAds.Api.InterstitialAd InterstitialTemp;
    private GoogleMobileAds.Api.RewardedAd rewardedAd;
    private GoogleMobileAds.Api.AppOpenAd openAdd;
    private GoogleMobileAds.Api.RewardedInterstitialAd rewardedInterstitialAd;
    public UnityEngine.GameObject AdloadingPanel;
    public static AdsManagerCustom instance;
    public static bool IsTempAddShow;
    public bool isadInit;
    private GoogleMobileAds.Api.AdSize adaptiveSize;
    private bool FirstTimeADShow;
    private int counter;
    private bool InterCall;
    private System.Action successCallBack;
    private bool isShowingAd;
    private int appOpenAdCounter;
    public bool isMRectActive;
    
    // Properties
    public bool IsAppOpenAdAvailable { get; }
    
    // Methods
    private void Awake()
    {
        if(mem[536882301] == 0)
        {
                mem2[0] = this;
            UnityEngine.Object.DontDestroyOnLoad(target:  this.gameObject);
            return;
        }
        
        UnityEngine.Object.Destroy(obj:  this.gameObject);
    }
    private void Start()
    {
        if(mem[536882289] == 0)
        {
                536882065 = 536882065;
        }
        
        this.adaptiveSize = GoogleMobileAds.Api.AdSize.GetLandscapeAnchoredAdaptiveBannerAdSizeWithWidth(width:  mem[536882249] + 40);
        this.Invoke(methodName:  -1610597989, time:  2f);
    }
    public void init_Ads()
    {
        mem2[0] = 1;
        System.Action<System.Object> val_1 = 536873377;
        val_1 = new System.Action<System.Object>(object:  this, method:  1610677043);
        GoogleMobileAds.Api.MobileAds.Initialize(initCompleteAction:  val_1);
        this.Invoke(methodName:  -1610605681, time:  9f);
    }
    private void LoadAllAds()
    {
        this.RequestBanner();
        this.RequestTopLeftBanner();
        this.RequestTopRightBanner();
        this.LoadAdmobInterstitial();
        this.LoadAdmobTempInterstitial();
        this.LoadAdmobRewardedVideo();
        this.RequestAndLoadAppOpenAd();
        UnityEngine.Coroutine val_2 = this.StartCoroutine(routine:  this.FirstTimeAd());
    }
    private System.Collections.IEnumerator FirstTimeAd()
    {
        object val_1 = 536897467;
        val_1 = new System.Object();
        mem[536897483] = 0;
        mem[536897499] = this;
        return (System.Collections.IEnumerator)val_1;
    }
    private GoogleMobileAds.Api.AdRequest CreateAdRequest()
    {
        GoogleMobileAds.Api.AdRequest val_1 = 536882063;
        val_1 = new GoogleMobileAds.Api.AdRequest();
        return val_1;
    }
    public void RequestBanner()
    {
        GoogleMobileAds.Api.BannerView val_10;
        GoogleMobileAds.Api.AdSize val_11;
        GoogleMobileAds.Api.AdPosition val_12;
        string val_13;
        if(this.bannerView != null)
        {
                this.bannerView.Destroy();
        }
        
        if(this.isTestMode != false)
        {
                val_10 = 536882879;
            val_11 = this.adaptiveSize;
            val_12 = this.adPosition;
            val_13 = -1610599951;
        }
        else
        {
                GoogleMobileAds.Api.BannerView val_1 = 536882879;
            val_10 = val_1;
            val_13 = this.bannerId;
            val_11 = this.adaptiveSize;
            val_12 = this.adPosition;
        }
        
        val_1 = new GoogleMobileAds.Api.BannerView(adUnitId:  val_13, adSize:  val_11, position:  val_12);
        this.bannerView = val_10;
        System.Action val_2 = 536881997;
        val_2 = new System.Action(object:  this, method:  1610677045);
        this.bannerView.add_OnBannerAdLoaded(value:  val_2);
        System.Action<System.Object> val_3 = 536873391;
        val_3 = new System.Action<System.Object>(object:  this, method:  1610677047);
        this.bannerView.add_OnBannerAdLoadFailed(value:  val_3);
        System.Action val_4 = 536881997;
        val_4 = new System.Action(object:  this, method:  1610677049);
        this.bannerView.add_OnAdImpressionRecorded(value:  val_4);
        System.Action val_5 = 536881997;
        val_5 = new System.Action(object:  this, method:  1610677051);
        this.bannerView.add_OnAdClicked(value:  val_5);
        System.Action val_6 = 536881997;
        val_6 = new System.Action(object:  this, method:  1610677053);
        this.bannerView.add_OnAdFullScreenContentOpened(value:  val_6);
        System.Action val_7 = 536881997;
        val_7 = new System.Action(object:  this, method:  1610677055);
        this.bannerView.add_OnAdFullScreenContentClosed(value:  val_7);
        System.Action<System.Object> val_8 = 536873287;
        val_8 = new System.Action<System.Object>(object:  this, method:  1610677057);
        this.bannerView.add_OnAdPaid(value:  val_8);
        this.bannerView.LoadAd(request:  this.CreateAdRequest());
    }
    public void RequestRect_Banner(GoogleMobileAds.Api.AdPosition adPosition)
    {
        var val_4;
        GoogleMobileAds.Api.BannerView val_5;
        GoogleMobileAds.Api.AdSize val_6;
        string val_7;
        var val_8;
        if(this.Rect_Banner != null)
        {
                this.Rect_Banner.Destroy();
        }
        
        if(this.isTestMode != false)
        {
                val_4 = 536882065;
            if(mem[536882289] == 0)
        {
                val_4 = 536882065;
        }
        
            val_5 = 536882879;
            val_6 = mem[536882249] + 8;
            val_7 = -1610599951;
        }
        else
        {
                val_8 = 536882065;
            if(mem[536882289] == 0)
        {
                val_8 = 536882065;
        }
        
            GoogleMobileAds.Api.BannerView val_1 = 536882879;
            val_5 = val_1;
            val_7 = this.RectangleBannerId;
            val_6 = mem[536882249] + 8;
        }
        
        val_1 = new GoogleMobileAds.Api.BannerView(adUnitId:  val_7, adSize:  val_6, position:  adPosition);
        this.Rect_Banner = val_5;
        System.Action<System.Object> val_2 = 536873287;
        val_2 = new System.Action<System.Object>(object:  this, method:  1610677059);
        this.Rect_Banner.add_OnAdPaid(value:  val_2);
        GoogleMobileAds.Api.AdRequest val_3 = 536882063;
        val_3 = new GoogleMobileAds.Api.AdRequest();
        this.Rect_Banner.LoadAd(request:  val_3);
    }
    public void ShowBanner()
    {
        if(this.bannerView != null)
        {
                this.bannerView.Show();
            return;
        }
        
        this.RequestBanner();
    }
    public void HideBanner()
    {
        if(this.bannerView == null)
        {
                return;
        }
        
        this.bannerView.Hide();
    }
    public void HideRectBanner()
    {
        if(this.Rect_Banner == null)
        {
                return;
        }
        
        this.Rect_Banner.Hide();
    }
    public void ShowRectBanner()
    {
        if(this.Rect_Banner != null)
        {
                this.Rect_Banner.Show();
            return;
        }
        
        this.RequestRect_Banner(adPosition:  4);
    }
    public void RequestTopLeftBanner()
    {
        var val_10;
        GoogleMobileAds.Api.BannerView val_11;
        var val_12;
        GoogleMobileAds.Api.AdSize val_13;
        string val_14;
        var val_15;
        if(this.topLeftBannerView != null)
        {
                this.topLeftBannerView.Destroy();
        }
        
        if(this.isTestMode != false)
        {
                val_10 = 536882065;
            if(mem[536882289] == 0)
        {
                val_10 = 536882065;
        }
        
            val_11 = 536882879;
            val_12 = 2;
            val_13 = mem[536882249];
            val_14 = -1610599951;
        }
        else
        {
                val_15 = 536882065;
            if(mem[536882289] == 0)
        {
                val_15 = 536882065;
        }
        
            GoogleMobileAds.Api.BannerView val_1 = 536882879;
            val_11 = val_1;
            val_12 = 2;
            val_14 = this.topLeftBannerID;
            val_13 = mem[536882249];
        }
        
        val_1 = new GoogleMobileAds.Api.BannerView(adUnitId:  val_14, adSize:  val_13, position:  2);
        this.topLeftBannerView = val_11;
        System.Action val_2 = 536881997;
        val_2 = new System.Action(object:  this, method:  1610677061);
        this.topLeftBannerView.add_OnBannerAdLoaded(value:  val_2);
        System.Action<System.Object> val_3 = 536873391;
        val_3 = new System.Action<System.Object>(object:  this, method:  1610677063);
        this.topLeftBannerView.add_OnBannerAdLoadFailed(value:  val_3);
        System.Action val_4 = 536881997;
        val_4 = new System.Action(object:  this, method:  1610677065);
        this.topLeftBannerView.add_OnAdImpressionRecorded(value:  val_4);
        System.Action val_5 = 536881997;
        val_5 = new System.Action(object:  this, method:  1610677067);
        this.topLeftBannerView.add_OnAdClicked(value:  val_5);
        System.Action val_6 = 536881997;
        val_6 = new System.Action(object:  this, method:  1610677069);
        this.topLeftBannerView.add_OnAdFullScreenContentOpened(value:  val_6);
        System.Action val_7 = 536881997;
        val_7 = new System.Action(object:  this, method:  1610677071);
        this.topLeftBannerView.add_OnAdFullScreenContentClosed(value:  val_7);
        System.Action<System.Object> val_8 = 536873287;
        val_8 = new System.Action<System.Object>(object:  this, method:  1610677073);
        this.topLeftBannerView.add_OnAdPaid(value:  val_8);
        GoogleMobileAds.Api.AdRequest val_9 = 536882063;
        val_9 = new GoogleMobileAds.Api.AdRequest();
        this.topLeftBannerView.LoadAd(request:  val_9);
    }
    public void ShowTopLeftBanner()
    {
        if(this.topLeftBannerView != null)
        {
                this.topLeftBannerView.Show();
            return;
        }
        
        this.RequestTopLeftBanner();
    }
    public void HideTopLeftBanner()
    {
        if(this.topLeftBannerView == null)
        {
                return;
        }
        
        this.topLeftBannerView.Hide();
    }
    public void DestroyAllBanner()
    {
        if(this.topLeftBannerView != null)
        {
                this.topLeftBannerView.Destroy();
        }
        
        if(this.topRightBannerView != null)
        {
                this.topRightBannerView.Destroy();
        }
        
        if(this.bannerView == null)
        {
                return;
        }
        
        this.bannerView.Destroy();
    }
    public void RequestTopRightBanner()
    {
        var val_10;
        GoogleMobileAds.Api.BannerView val_11;
        var val_12;
        GoogleMobileAds.Api.AdSize val_13;
        string val_14;
        var val_15;
        if(this.topRightBannerView != null)
        {
                this.topRightBannerView.Destroy();
        }
        
        if(this.isTestMode != false)
        {
                val_10 = 536882065;
            if(mem[536882289] == 0)
        {
                val_10 = 536882065;
        }
        
            val_11 = 536882879;
            val_12 = 3;
            val_13 = mem[536882249];
            val_14 = -1610599951;
        }
        else
        {
                val_15 = 536882065;
            if(mem[536882289] == 0)
        {
                val_15 = 536882065;
        }
        
            GoogleMobileAds.Api.BannerView val_1 = 536882879;
            val_11 = val_1;
            val_12 = 3;
            val_14 = this.topRightBannerID;
            val_13 = mem[536882249];
        }
        
        val_1 = new GoogleMobileAds.Api.BannerView(adUnitId:  val_14, adSize:  val_13, position:  3);
        this.topRightBannerView = val_11;
        System.Action val_2 = 536881997;
        val_2 = new System.Action(object:  this, method:  1610677075);
        this.topRightBannerView.add_OnBannerAdLoaded(value:  val_2);
        System.Action<System.Object> val_3 = 536873391;
        val_3 = new System.Action<System.Object>(object:  this, method:  1610677077);
        this.topRightBannerView.add_OnBannerAdLoadFailed(value:  val_3);
        System.Action val_4 = 536881997;
        val_4 = new System.Action(object:  this, method:  1610677079);
        this.topRightBannerView.add_OnAdImpressionRecorded(value:  val_4);
        System.Action val_5 = 536881997;
        val_5 = new System.Action(object:  this, method:  1610677081);
        this.topRightBannerView.add_OnAdClicked(value:  val_5);
        System.Action val_6 = 536881997;
        val_6 = new System.Action(object:  this, method:  1610677083);
        this.topRightBannerView.add_OnAdFullScreenContentOpened(value:  val_6);
        System.Action val_7 = 536881997;
        val_7 = new System.Action(object:  this, method:  1610677085);
        this.topRightBannerView.add_OnAdFullScreenContentClosed(value:  val_7);
        System.Action<System.Object> val_8 = 536873287;
        val_8 = new System.Action<System.Object>(object:  this, method:  1610677087);
        this.topRightBannerView.add_OnAdPaid(value:  val_8);
        GoogleMobileAds.Api.AdRequest val_9 = 536882063;
        val_9 = new GoogleMobileAds.Api.AdRequest();
        this.topRightBannerView.LoadAd(request:  val_9);
    }
    public void ShowTopRightBanner()
    {
        if(this.topRightBannerView != null)
        {
                this.topRightBannerView.Show();
            return;
        }
        
        this.RequestTopRightBanner();
    }
    public void HideTopRightBanner()
    {
        if(this.topRightBannerView == null)
        {
                return;
        }
        
        this.topRightBannerView.Hide();
    }
    public void HideAllBanner()
    {
        if(this.bannerView != null)
        {
                this.bannerView.Hide();
        }
        
        if(this.topLeftBannerView != null)
        {
                this.topLeftBannerView.Hide();
        }
        
        if(this.topRightBannerView == null)
        {
                return;
        }
        
        this.topRightBannerView.Hide();
    }
    private void LoadAdmobInterstitial()
    {
        if(this.interstitial != null)
        {
                this.interstitial.Destroy();
        }
        
        this.CreateAndLoadInterstitialAd(adUnitId:  (this.isTestMode == false) ? this.interId : 27529392);
    }
    private void LoadAdmobTempInterstitial()
    {
        if(this.InterstitialTemp != null)
        {
                this.InterstitialTemp.Destroy();
        }
        
        this.CreateAndLoad_TempInterstitialAd(adUnitId:  (this.isTestMode == false) ? this.InterTemp_id : 27529392);
    }
    public void CreateAndLoadInterstitialAd(string adUnitId)
    {
        System.Action<System.Object, System.Object> val_2 = 536873497;
        val_2 = new System.Action<System.Object, System.Object>(object:  this, method:  1610677089);
        GoogleMobileAds.Api.InterstitialAd.Load(adUnitId:  adUnitId, request:  this.CreateAdRequest(), adLoadCallback:  val_2);
    }
    public void CreateAndLoad_TempInterstitialAd(string adUnitId)
    {
        System.Action<System.Object, System.Object> val_2 = 536873497;
        val_2 = new System.Action<System.Object, System.Object>(object:  this, method:  1610677103);
        GoogleMobileAds.Api.InterstitialAd.Load(adUnitId:  adUnitId, request:  this.CreateAdRequest(), adLoadCallback:  val_2);
    }
    private void LoadAdmobRewardedVideo()
    {
        if(this.rewardedAd != null)
        {
                this.rewardedAd.Destroy();
        }
        
        System.Action<System.Object, System.Object> val_2 = 536873515;
        val_2 = new System.Action<System.Object, System.Object>(object:  this, method:  1610677117);
        GoogleMobileAds.Api.RewardedAd.Load(adUnitId:  this.rewardedId, request:  this.rewardedAd.CreateAdRequest(), adLoadCallback:  val_2);
    }
    public bool isAdmobRewardedVideoAvailable()
    {
        if(this.rewardedAd == null)
        {
                return false;
        }
        
        if(this.rewardedAd.CanShowAd() == false)
        {
                return false;
        }
        
        return false;
    }
    private void showAdmobRewardedVideo(System.Action _successCallBack)
    {
        object val_1 = 536897465;
        val_1 = new System.Object();
        mem[536897481] = _successCallBack;
        mem[536897489] = this;
        if(this.rewardedAd.CanShowAd() != false)
        {
                this.appOpenAdCounter = 1;
            this.AdloadingPanel.SetActive(value:  true);
            this.successCallBack = mem[536897481];
            System.Action<System.Object> val_3 = 536873431;
            val_3 = new System.Action<System.Object>(object:  val_1, method:  1610677153);
            this.rewardedAd.Show(userRewardEarnedCallback:  val_3);
            return;
        }
        
        this.LoadAdmobRewardedVideo();
    }
    public bool get_IsAppOpenAdAvailable()
    {
        if(this.openAdd == null)
        {
                return (bool)this.openAdd;
        }
        
        return this.openAdd.CanShowAd();
    }
    public void RequestAndLoadAppOpenAd()
    {
        this.PrintStatus(message:  -1610604129);
        if(this.openAdd != null)
        {
                this.DestroyAppOpenAd();
        }
        
        GoogleMobileAds.Api.AdRequest val_2 = 536882063;
        val_2 = new GoogleMobileAds.Api.AdRequest();
        System.Action<System.Object, System.Object> val_3 = 536873483;
        val_3 = new System.Action<System.Object, System.Object>(object:  this, method:  1610677131);
        GoogleMobileAds.Api.AppOpenAd.Load(adUnitId:  (this.isTestMode == false) ? this.appOpenId : 27529400, orientation:  1, request:  val_2, adLoadCallback:  val_3);
    }
    private void RegisterEventHandlers(GoogleMobileAds.Api.AppOpenAd ad)
    {
        object val_7;
        var val_8;
        System.Action val_9;
        var val_10;
        System.Action val_11;
        var val_12;
        System.Action<GoogleMobileAds.Api.AdError> val_13;
        val_7 = 27331904;
        System.Action<System.Object> val_1 = 536873287;
        val_1 = new System.Action<System.Object>(object:  this, method:  1610677133);
        ad.add_OnAdPaid(value:  val_1);
        val_8 = 536897461;
        if(mem[536897685] == 0)
        {
                val_8 = 536897461;
        }
        
        val_9 = mem[mem[536897645] + 8];
        val_9 = mem[536897645] + 8;
        if(val_9 == 0)
        {
                if(mem[536897685] == 0)
        {
                val_8 = 536897461;
        }
        
            System.Action val_2 = 536881997;
            val_7 = mem[mem[536897645]];
            val_7 = mem[536897645];
            val_9 = val_2;
            val_2 = new System.Action(object:  val_7, method:  1610677159);
            mem2[0] = val_9;
        }
        
        ad.add_OnAdImpressionRecorded(value:  val_9);
        val_10 = 536897461;
        if(mem[536897685] == 0)
        {
                val_10 = 536897461;
        }
        
        val_11 = mem[mem[536897645] + 16];
        val_11 = mem[536897645] + 16;
        if(val_11 == 0)
        {
                if(mem[536897685] == 0)
        {
                val_10 = 536897461;
        }
        
            System.Action val_3 = 536881997;
            val_7 = mem[mem[536897645]];
            val_7 = mem[536897645];
            val_11 = val_3;
            val_3 = new System.Action(object:  val_7, method:  1610677161);
            mem2[0] = val_11;
        }
        
        ad.add_OnAdClicked(value:  val_11);
        System.Action val_4 = 536881997;
        val_4 = new System.Action(object:  this, method:  1610677135);
        ad.add_OnAdFullScreenContentOpened(value:  val_4);
        System.Action val_5 = 536881997;
        val_5 = new System.Action(object:  this, method:  1610677137);
        ad.add_OnAdFullScreenContentClosed(value:  val_5);
        val_12 = 536897461;
        if(mem[536897685] == 0)
        {
                val_12 = 536897461;
        }
        
        val_13 = mem[mem[536897645] + 24];
        val_13 = mem[536897645] + 24;
        if(val_13 == 0)
        {
                if(mem[536897685] == 0)
        {
                val_12 = 536897461;
        }
        
            System.Action<System.Object> val_6 = 536873271;
            val_13 = val_6;
            val_6 = new System.Action<System.Object>(object:  mem[536897645], method:  1610677163);
            mem2[0] = val_13;
        }
        
        ad.add_OnAdFullScreenContentFailed(value:  val_13);
    }
    public void DestroyAppOpenAd()
    {
        if(this.openAdd == null)
        {
                return;
        }
        
        this.openAdd.Destroy();
        this.openAdd = 0;
    }
    public void ShowAppOpenAd()
    {
        if(this.openAdd == null)
        {
                return;
        }
        
        if(this.openAdd.CanShowAd() == false)
        {
                return;
        }
        
        this.openAdd.Show();
    }
    private void OnApplicationPause(bool paused)
    {
        if(paused == false)
        {
            goto label_0;
        }
        
        if((this.isadInit == false) || (this.bannerView == null))
        {
            goto label_4;
        }
        
        this.bannerView.Hide();
        goto label_4;
        label_0:
        if(this.isadInit == false)
        {
            goto label_4;
        }
        
        if(this.CheckInternetAvailable() == false)
        {
                return;
        }
        
        if(this.isMRectActive != false)
        {
                this.ShowRectBanner();
        }
        
        this.ShowBanner();
        this.AdloadingPanel.SetActive(value:  false);
        if(this.appOpenAdCounter == 0)
        {
            goto label_8;
        }
        
        this.appOpenAdCounter = 0;
        return;
        label_4:
        if(this.isMRectActive == false)
        {
                return;
        }
        
        if(this.Rect_Banner == null)
        {
                return;
        }
        
        this.Rect_Banner.Hide();
        return;
        label_8:
        this.AdloadingPanel.SetActive(value:  true);
        this.ShowAppOpenAd();
    }
    public void ShowAdmobInterstitial()
    {
        if(this.CheckInternetAvailable() == false)
        {
                return;
        }
        
        if(this.interstitial != null)
        {
                if(this.interstitial.CanShowAd() != false)
        {
                this.appOpenAdCounter = 1;
            this.AdloadingPanel.SetActive(value:  true);
            this.interstitial.Show();
            return;
        }
        
        }
        
        this.LoadAdmobInterstitial();
    }
    public void ShowAdmobInterstitial_Temp()
    {
        if((mem[536882301] + 8) == 0)
        {
                return;
        }
        
        if(this.CheckInternetAvailable() == false)
        {
                return;
        }
        
        if(this.InterstitialTemp != null)
        {
                if(this.InterstitialTemp.CanShowAd() != false)
        {
                this.appOpenAdCounter = 1;
            this.AdloadingPanel.SetActive(value:  true);
            this.InterstitialTemp.Show();
            return;
        }
        
        }
        
        this.LoadAdmobTempInterstitial();
    }
    public void ShowUnityInterstital()
    {
        if(this.interstitial.CanShowAd() != false)
        {
                this.interstitial.Show();
            return;
        }
        
        this.LoadAdmobInterstitial();
    }
    public void ShowRewardedAdmobPriority(System.Action _successCallBack)
    {
        if(this.CheckInternetAvailable() == false)
        {
                return;
        }
        
        if(this.rewardedAd != null)
        {
                if(this.rewardedAd.CanShowAd() != false)
        {
                this.showAdmobRewardedVideo(_successCallBack:  _successCallBack);
            return;
        }
        
        }
        
        this.LoadAdmobRewardedVideo();
    }
    public void ShowAdmobRewardedInterstital(System.Action<GoogleMobileAds.Api.Reward> userRewardFunction)
    {
        if(this.rewardedInterstitialAd == null)
        {
                return;
        }
        
        this.rewardedInterstitialAd.Show(userEarnedRewardCallback:  userRewardFunction);
    }
    public bool CheckInternetAvailable()
    {
        if(UnityEngine.Application.internetReachability != 0)
        {
                return false;
        }
        
        UnityEngine.Debug.Log(message:  -1610607687);
        return false;
    }
    private void PrintStatus(string message)
    {
        object val_2;
        var val_3;
        System.Action val_4;
        val_2 = 27345240;
        UnityEngine.Debug.Log(message:  message);
        val_3 = 536897461;
        if(mem[536897685] == 0)
        {
                val_3 = 536897461;
        }
        
        val_4 = mem[mem[536897645] + 32];
        val_4 = mem[536897645] + 32;
        if(val_4 == 0)
        {
                if(mem[536897685] == 0)
        {
                val_3 = 536897461;
        }
        
            System.Action val_1 = 536881997;
            val_2 = mem[mem[536897645]];
            val_2 = mem[536897645];
            val_4 = val_1;
            val_1 = new System.Action(object:  val_2, method:  1610677165);
            mem2[0] = val_4;
        }
        
        GoogleMobileAds.Common.MobileAdsEventExecutor.ExecuteInUpdate(action:  val_4);
    }
    public void AirbridgeEvent(GoogleMobileAds.Api.AdValue adValue, string Id, string adNetworkAdapter)
    {
    
    }
    private void solarEvent(GoogleMobileAds.Api.AdValue adValue, int AdType, string adId)
    {
        double val_1 = (double)adValue._Value_k__BackingField;
        val_1 = val_1 / 1000;
        SolarEngine.Analytics.trackIAI(attributes:  new SolarEngine.AppImpressionAttributes() {_is_rendered_k__BackingField = false});
    }
    public AdsManagerCustom()
    {
        this.InterCall = true;
    }
    private void <init_Ads>b__28_0(GoogleMobileAds.Api.InitializationStatus initStatus)
    {
        var val_6;
        System.Collections.Generic.Dictionary<TKey, TValue>.System.Collections.Generic.Dictionary.Enumerator<Unknown, Unknown> val_2 = initStatus.getAdapterStatusMap().GetEnumerator();
        label_8:
        if(0.MoveNext() == false)
        {
            goto label_3;
        }
        
        if(0 == 0)
        {
            goto label_4;
        }
        
        if(11993091 == 0)
        {
            goto label_5;
        }
        
        if(11993091 != 1)
        {
            goto label_8;
        }
        
        this.isadInit = true;
        UnityEngine.MonoBehaviour.print(message:  -1610609929(-1610609929) + 0 + -1610612395(-1610612395));
        goto label_8;
        label_5:
        UnityEngine.MonoBehaviour.print(message:  -1610609929(-1610609929) + 0 + -1610612369(-1610612369));
        goto label_8;
        label_3:
        0.Dispose();
        return;
        label_4:
        val_6 = 27380944;
        throw new NullReferenceException();
    }
    private void <RequestBanner>b__34_0()
    {
        this.PrintStatus(message:  -1610609485);
    }
    private void <RequestBanner>b__34_1(GoogleMobileAds.Api.LoadAdError error)
    {
        string val_2 = -1610609487(-1610609487) + error.GetMessage();
        val_2.PrintStatus(message:  val_2);
    }
    private void <RequestBanner>b__34_2()
    {
        this.PrintStatus(message:  -1610609477);
    }
    private void <RequestBanner>b__34_3()
    {
        this.PrintStatus(message:  -1610609479);
    }
    private void <RequestBanner>b__34_4()
    {
        this.PrintStatus(message:  -1610609483);
    }
    private void <RequestBanner>b__34_5()
    {
        this.PrintStatus(message:  -1610609489);
    }
    private void <RequestBanner>b__34_6(GoogleMobileAds.Api.AdValue adValue)
    {
        string val_1 = System.String.Format(format:  -1610594783, arg0:  -1610609481, arg1:  adValue._CurrencyCode_k__BackingField, arg2:  536888155);
        val_1.PrintStatus(message:  val_1);
        this.solarEvent(adValue:  adValue, AdType:  5, adId:  this.bannerId);
    }
    private void <RequestRect_Banner>b__35_0(GoogleMobileAds.Api.AdValue adValue)
    {
        string val_1 = System.String.Format(format:  -1610594783, arg0:  -1610609481, arg1:  adValue._CurrencyCode_k__BackingField, arg2:  536888155);
        val_1.PrintStatus(message:  val_1);
        this.solarEvent(adValue:  adValue, AdType:  5, adId:  this.RectangleBannerId);
    }
    private void <RequestTopLeftBanner>b__40_0()
    {
        this.PrintStatus(message:  -1610609485);
    }
    private void <RequestTopLeftBanner>b__40_1(GoogleMobileAds.Api.LoadAdError error)
    {
        string val_2 = -1610609487(-1610609487) + error.GetMessage();
        val_2.PrintStatus(message:  val_2);
    }
    private void <RequestTopLeftBanner>b__40_2()
    {
        this.PrintStatus(message:  -1610609477);
    }
    private void <RequestTopLeftBanner>b__40_3()
    {
        this.PrintStatus(message:  -1610609479);
    }
    private void <RequestTopLeftBanner>b__40_4()
    {
        this.PrintStatus(message:  -1610609483);
    }
    private void <RequestTopLeftBanner>b__40_5()
    {
        this.PrintStatus(message:  -1610609489);
    }
    private void <RequestTopLeftBanner>b__40_6(GoogleMobileAds.Api.AdValue adValue)
    {
        this.solarEvent(adValue:  adValue, AdType:  5, adId:  this.topLeftBannerID);
        this.PrintStatus(message:  System.String.Format(format:  -1610594783, arg0:  -1610609481, arg1:  adValue._CurrencyCode_k__BackingField, arg2:  536888155));
    }
    private void <RequestTopRightBanner>b__44_0()
    {
        this.PrintStatus(message:  -1610609485);
    }
    private void <RequestTopRightBanner>b__44_1(GoogleMobileAds.Api.LoadAdError error)
    {
        string val_2 = -1610609487(-1610609487) + error.GetMessage();
        val_2.PrintStatus(message:  val_2);
    }
    private void <RequestTopRightBanner>b__44_2()
    {
        this.PrintStatus(message:  -1610609477);
    }
    private void <RequestTopRightBanner>b__44_3()
    {
        this.PrintStatus(message:  -1610609479);
    }
    private void <RequestTopRightBanner>b__44_4()
    {
        this.PrintStatus(message:  -1610609483);
    }
    private void <RequestTopRightBanner>b__44_5()
    {
        this.PrintStatus(message:  -1610609489);
    }
    private void <RequestTopRightBanner>b__44_6(GoogleMobileAds.Api.AdValue adValue)
    {
        this.solarEvent(adValue:  adValue, AdType:  5, adId:  this.topRightBannerID);
        this.PrintStatus(message:  System.String.Format(format:  -1610594783, arg0:  -1610609481, arg1:  adValue._CurrencyCode_k__BackingField, arg2:  536888155));
    }
    private void <CreateAndLoadInterstitialAd>b__51_0(GoogleMobileAds.Api.InterstitialAd ad, GoogleMobileAds.Api.LoadAdError loadError)
    {
        if(loadError == null)
        {
            goto label_1;
        }
        
        string val_2 = -1610606519(-1610606519) + loadError.GetMessage();
        label_10:
        val_2.PrintStatus(message:  val_2);
        return;
        label_1:
        if(ad == null)
        {
            goto label_10;
        }
        
        this.PrintStatus(message:  -1610606505);
        this.interstitial = ad;
        System.Action val_3 = 536881997;
        val_3 = new System.Action(object:  this, method:  1610677091);
        ad.add_OnAdFullScreenContentOpened(value:  val_3);
        System.Action val_4 = 536881997;
        val_4 = new System.Action(object:  this, method:  1610677093);
        ad.add_OnAdFullScreenContentClosed(value:  val_4);
        System.Action val_5 = 536881997;
        val_5 = new System.Action(object:  this, method:  1610677095);
        ad.add_OnAdImpressionRecorded(value:  val_5);
        System.Action val_6 = 536881997;
        val_6 = new System.Action(object:  this, method:  1610677097);
        ad.add_OnAdClicked(value:  val_6);
        System.Action<System.Object> val_7 = 536873271;
        val_7 = new System.Action<System.Object>(object:  this, method:  1610677099);
        ad.add_OnAdFullScreenContentFailed(value:  val_7);
        System.Action<System.Object> val_8 = 536873287;
        val_8 = new System.Action<System.Object>(object:  this, method:  1610677101);
        ad.add_OnAdPaid(value:  val_8);
        if(this.InterCall == false)
        {
                return;
        }
        
        this.InterCall = false;
        this.ShowAdmobInterstitial();
    }
    private void <CreateAndLoadInterstitialAd>b__51_1()
    {
        this.PrintStatus(message:  -1610606503);
    }
    private void <CreateAndLoadInterstitialAd>b__51_2()
    {
        this.AdloadingPanel.SetActive(value:  false);
        if(this.interstitial != null)
        {
                if(this.interstitial.CanShowAd() != true)
        {
                this.LoadAdmobInterstitial();
        }
        
        }
        
        this.PrintStatus(message:  -1610606521);
    }
    private void <CreateAndLoadInterstitialAd>b__51_3()
    {
        this.PrintStatus(message:  -1610606495);
    }
    private void <CreateAndLoadInterstitialAd>b__51_4()
    {
        this.PrintStatus(message:  -1610606497);
    }
    private void <CreateAndLoadInterstitialAd>b__51_5(GoogleMobileAds.Api.AdError error)
    {
        string val_2 = -1610606513(-1610606513) + error.GetMessage();
        val_2.PrintStatus(message:  val_2);
    }
    private void <CreateAndLoadInterstitialAd>b__51_6(GoogleMobileAds.Api.AdValue adValue)
    {
        UnityEngine.Debug.LogError(message:  -1610604619);
        this.PrintStatus(message:  System.String.Format(format:  -1610594783, arg0:  -1610606499, arg1:  adValue._CurrencyCode_k__BackingField, arg2:  536888155));
        this.solarEvent(adValue:  adValue, AdType:  3, adId:  this.interId);
    }
    private void <CreateAndLoad_TempInterstitialAd>b__52_0(GoogleMobileAds.Api.InterstitialAd ad, GoogleMobileAds.Api.LoadAdError loadError)
    {
        if(loadError == null)
        {
            goto label_1;
        }
        
        string val_2 = -1610606519(-1610606519) + loadError.GetMessage();
        label_9:
        val_2.PrintStatus(message:  val_2);
        return;
        label_1:
        if(ad == null)
        {
            goto label_9;
        }
        
        this.PrintStatus(message:  -1610606505);
        this.InterstitialTemp = ad;
        System.Action val_3 = 536881997;
        val_3 = new System.Action(object:  this, method:  1610677105);
        ad.add_OnAdFullScreenContentOpened(value:  val_3);
        System.Action val_4 = 536881997;
        val_4 = new System.Action(object:  this, method:  1610677107);
        ad.add_OnAdFullScreenContentClosed(value:  val_4);
        System.Action val_5 = 536881997;
        val_5 = new System.Action(object:  this, method:  1610677109);
        ad.add_OnAdImpressionRecorded(value:  val_5);
        System.Action val_6 = 536881997;
        val_6 = new System.Action(object:  this, method:  1610677111);
        ad.add_OnAdClicked(value:  val_6);
        System.Action<System.Object> val_7 = 536873271;
        val_7 = new System.Action<System.Object>(object:  this, method:  1610677113);
        ad.add_OnAdFullScreenContentFailed(value:  val_7);
        System.Action<System.Object> val_8 = 536873287;
        val_8 = new System.Action<System.Object>(object:  this, method:  1610677115);
        ad.add_OnAdPaid(value:  val_8);
    }
    private void <CreateAndLoad_TempInterstitialAd>b__52_1()
    {
        this.PrintStatus(message:  -1610606503);
    }
    private void <CreateAndLoad_TempInterstitialAd>b__52_2()
    {
        this.AdloadingPanel.SetActive(value:  false);
        if(this.InterstitialTemp != null)
        {
                if(this.InterstitialTemp.CanShowAd() != true)
        {
                this.LoadAdmobTempInterstitial();
        }
        
        }
        
        this.PrintStatus(message:  -1610606521);
    }
    private void <CreateAndLoad_TempInterstitialAd>b__52_3()
    {
        this.PrintStatus(message:  -1610606495);
    }
    private void <CreateAndLoad_TempInterstitialAd>b__52_4()
    {
        this.PrintStatus(message:  -1610606497);
    }
    private void <CreateAndLoad_TempInterstitialAd>b__52_5(GoogleMobileAds.Api.AdError error)
    {
        string val_2 = -1610606513(-1610606513) + error.GetMessage();
        val_2.PrintStatus(message:  val_2);
    }
    private void <CreateAndLoad_TempInterstitialAd>b__52_6(GoogleMobileAds.Api.AdValue adValue)
    {
        string val_1 = System.String.Format(format:  -1610594783, arg0:  -1610606499, arg1:  adValue._CurrencyCode_k__BackingField, arg2:  536888155);
        val_1.PrintStatus(message:  val_1);
        this.solarEvent(adValue:  adValue, AdType:  3, adId:  this.InterTemp_id);
    }
    private void <LoadAdmobRewardedVideo>b__54_0(GoogleMobileAds.Api.RewardedAd ad, GoogleMobileAds.Api.LoadAdError loadError)
    {
        if(loadError == null)
        {
            goto label_1;
        }
        
        string val_2 = -1610604079(-1610604079) + loadError.GetMessage();
        label_9:
        val_2.PrintStatus(message:  val_2);
        return;
        label_1:
        if(ad == null)
        {
            goto label_9;
        }
        
        this.PrintStatus(message:  -1610604067);
        this.rewardedAd = ad;
        System.Action val_3 = 536881997;
        val_3 = new System.Action(object:  this, method:  1610677119);
        ad.add_OnAdFullScreenContentOpened(value:  val_3);
        System.Action val_4 = 536881997;
        val_4 = new System.Action(object:  this, method:  1610677121);
        ad.add_OnAdFullScreenContentClosed(value:  val_4);
        System.Action val_5 = 536881997;
        val_5 = new System.Action(object:  this, method:  1610677123);
        ad.add_OnAdImpressionRecorded(value:  val_5);
        System.Action val_6 = 536881997;
        val_6 = new System.Action(object:  this, method:  1610677125);
        ad.add_OnAdClicked(value:  val_6);
        System.Action<System.Object> val_7 = 536873271;
        val_7 = new System.Action<System.Object>(object:  this, method:  1610677127);
        ad.add_OnAdFullScreenContentFailed(value:  val_7);
        System.Action<System.Object> val_8 = 536873287;
        val_8 = new System.Action<System.Object>(object:  this, method:  1610677129);
        ad.add_OnAdPaid(value:  val_8);
    }
    private void <LoadAdmobRewardedVideo>b__54_1()
    {
        this.PrintStatus(message:  -1610604065);
    }
    private void <LoadAdmobRewardedVideo>b__54_2()
    {
        this.AdloadingPanel.SetActive(value:  false);
        if(this.rewardedAd != null)
        {
                if(this.rewardedAd.CanShowAd() == true)
        {
            goto label_3;
        }
        
        }
        
        this.LoadAdmobRewardedVideo();
        label_3:
        this.PrintStatus(message:  -1610604083);
    }
    private void <LoadAdmobRewardedVideo>b__54_3()
    {
        this.PrintStatus(message:  -1610604057);
    }
    private void <LoadAdmobRewardedVideo>b__54_4()
    {
        this.PrintStatus(message:  -1610604059);
    }
    private void <LoadAdmobRewardedVideo>b__54_5(GoogleMobileAds.Api.AdError error)
    {
        string val_2 = -1610604073(-1610604073) + error.GetMessage();
        val_2.PrintStatus(message:  val_2);
    }
    private void <LoadAdmobRewardedVideo>b__54_6(GoogleMobileAds.Api.AdValue adValue)
    {
        string val_1 = System.String.Format(format:  -1610594783, arg0:  -1610604061, arg1:  adValue._CurrencyCode_k__BackingField, arg2:  536888155);
        val_1.PrintStatus(message:  val_1);
        this.solarEvent(adValue:  adValue, AdType:  1, adId:  this.rewardedId);
    }
    private void <RequestAndLoadAppOpenAd>b__60_0(GoogleMobileAds.Api.AppOpenAd ad, GoogleMobileAds.Api.LoadAdError error)
    {
        string val_4;
        string val_5;
        if((ad == null) || (error != null))
        {
            goto label_2;
        }
        
        GoogleMobileAds.Api.ResponseInfo val_1 = ad.GetResponseInfo();
        if(val_1 == null)
        {
            goto label_3;
        }
        
        val_4 = val_1;
        goto label_4;
        label_2:
        if(error == null)
        {
            goto label_5;
        }
        
        val_5 = error;
        goto label_6;
        label_3:
        val_4 = 0;
        label_4:
        UnityEngine.Debug.Log(message:  -1610609759(-1610609759) + val_4);
        this.openAdd = ad;
        this.RegisterEventHandlers(ad:  ad);
        return;
        label_5:
        val_5 = 0;
        label_6:
        UnityEngine.Debug.LogError(message:  -1610600293(-1610600293) + val_5);
    }
    private void <RegisterEventHandlers>b__61_0(GoogleMobileAds.Api.AdValue adValue)
    {
        UnityEngine.Debug.Log(message:  System.String.Format(format:  -1610609757, arg0:  536888155, arg1:  adValue._CurrencyCode_k__BackingField));
        this.solarEvent(adValue:  adValue, AdType:  0, adId:  this.appOpenId);
    }
    private void <RegisterEventHandlers>b__61_3()
    {
        this.isShowingAd = true;
        UnityEngine.Debug.Log(message:  -1610609761);
    }
    private void <RegisterEventHandlers>b__61_4()
    {
        this.AdloadingPanel.SetActive(value:  false);
        this.RequestAndLoadAppOpenAd();
        this.isShowingAd = false;
        UnityEngine.Debug.Log(message:  -1610609763);
    }

}
